Repository navigation
Plan 320: require --public for any non-loopback bind - #6
Merged
Merged
Conversation
Close the operator footgun where unicast LAN/public addresses could bind without acknowledgment; align CLI, Python ServeConfig/runtime, and docs. Co-authored-by: Cursor <cursoragent@cursor.com>
Correct the five TLS seam defects found by the capability review at 26649bd plus the reload-coherence gap found by its follow-up security review: - Build every rustls server configuration with the ring provider explicitly instead of the process default, and drop the Python wheel's global install_default workaround. - Validate TLS ALPN against HTTP/2 availability at build/start, and reject a contradictory snapshot at ServerHandle's reload swap before it becomes live. - Map --header-timeout onto tls_handshake_timeout, matching the published security policy. - Make the named-SNI identity ceiling order-independent; the optional default identity no longer counts toward it. - Bound H3 QUIC receive windows and idle timeout to the VarInt range and report transport failures as InvalidTransportConfig instead of InvalidKey. Milestone 321/322 implementation and closure records, the TLS identity roadmap, the registry (next number 323), the CHANGELOG, and the affected docs are included. The milestone records carry the exact verification commands and outcomes, including the two pre-existing macOS-only test failures that keep the broad verify wrapper red on this host.
Main allocated plans 320-325 to its post-audit batch, colliding with this branch's 320-322. Resolve the numbering: 326 public-bind acknowledgment tightening, 327 TLS substrate corrective, 328 reload ALPN coherence; next milestone number 329. The two branch commits keep their historical numbers in their messages. Both sides' code is kept: main's systemd double-adoption guard, framing rejection close, identity PEM bound, and dependency refresh, plus this branch's provider-explicit rustls construction, ALPN/runtime validation at build/start and at the reload swap, --header-timeout handshake bound, order-independent identity ceiling, and typed H3 transport bounds. Conflict resolution keeps `--public` acknowledgment-only while widening it to any non-loopback bind; main's docs described the older wildcard-only gate. Registry, roadmaps, CHANGELOG, and closure records are reconciled. Verified before commit: fmt, workspace check, workspace tests, workspace and Python clippy, MSRV base/http2/http3, tower/interop lanes (the known macOS-only eggserve-server test still fails), focused TLS suites, and the topology gate.
Http3Config::validate checked send_window and max_send_buf_size in one arm and always reported http3.send_window, so a zero send buffer produced a false field attribution for a field that was valid. Split the check into per-field arms, matching the http2.max_send_buf_size diagnostic, and cover both branches with zero_send_buf_size_names_its_own_field. The 327 closure record gains a post-closure note recording the correction and the remaining open low finding: max_send_buf_size is bounded only below, and send_window has no upper bound although quinn documents it as the per-connection retained-write memory cap. Verified before commit: cargo fmt --all -- --check, cargo test -p eggserve-h3, cargo clippy -p eggserve-h3 --all-targets -D warnings, and cargo test -p eggserve-core --features http3,tls --lib.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
--public/public=Truefor any non-loopback bind (unicast LAN/public addresses as well as0.0.0.0/::), closing the operator footgun where only unspecified addresses were gated.ServeConfig/ native runtime, stdlib-compat address intent, docs, and Plan 320 registry/closure records.Test plan
cargo test -p eggserve-bin --lib(bind-gate unit tests)TestConfigValidation)rust/supply-chain/pythonjobs green on this PRMade with Cursor